#define _CRT_SECURE_NO_WARNINGS 1

class Solution {
public:
    vector<vector<int>> ret;
    vector<int> path;
    vector<vector<int>> subsets(vector<int>& nums)
    {
        ret.push_back(path);
        dfs(nums, 0);
        return ret;
    }

    void dfs(vector<int>& nums, int pos)
    {
        for (int i = pos; i < nums.size(); i++)
        {
            path.push_back(nums[i]);
            ret.push_back(path);
            dfs(nums, i + 1);

            path.pop_back();
        }

    }
};